<ion-header>
  <ion-navbar hideBackButton="true">
    <ion-icon ios="ios-close" md="md-close" style="margin-left: 20px" (click)="cancel()"></ion-icon>
    <ion-icon ios="ios-paper-plane" md="md-paper-plane" style="float: right;margin-right: 20px"
              (click)="publish()"></ion-icon>
  </ion-navbar>
</ion-header>
<ion-content>
  <form style="height:100%;">
    <ion-item class="article-title-input">
      <ion-input [(ngModel)]="articleForm.title" name="title" type="text" placeholder="请输入文章标题"></ion-input>
    </ion-item>
    <ion-item [hidden]="!articleForm.movieURL" class="article-title-input">
      <ion-input [(ngModel)]="articleForm.movieURL" name="movieURL" type="text" readonly></ion-input>
    </ion-item>
    <iframe #iframe style="height: 100%" id="editor-frame" width="100%" height="100%" frameborder="0"
            src="javascript:void(function(){document.open();document.write(&quot;
              <!DOCTYPE html><html xmlns='http://www.w3.org/1999/xhtml' class='view' ><head><style type='text/css'>.view{padding:0;word-wrap:break-word;cursor:text;height:90%;}
body{margin:8px;font-family:sans-serif;font-size:16px;}p{margin:5px 0;}</style>
</head>
<body contenteditable='true' style='height:100%' spellcheck='false'></body></html>&quot;);document.close();}())">
      <!doctype html>
      <html lang="en">
      <head>
        <meta charset="UTF-8">
        <meta name="viewport"
              content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <title>Document</title>
      </head>
      <body contenteditable='true' spellcheck='false'>
      </body>
      </html>
    </iframe>
  </form>
</ion-content>
<ion-footer>
  <ion-toolbar>
    <ion-icon ios="ios-reverse-camera" md="md-reverse-camera" (click)="insertPicClick()"></ion-icon>
    <!--<ion-icon ios="ios-videocam" md="md-videocam" (click)="insertMovieClick()"></ion-icon>-->
    <ion-icon ios="ios-link" md="md-link" (click)="insertLink()"></ion-icon>
  </ion-toolbar>
</ion-footer>
